package com.reviewit.model;

import java.io.Serializable;

import org.bson.types.ObjectId;

import com.google.code.morphia.annotations.Entity;

@Entity("administrators")
public class Administrator extends UserBase implements Serializable {
	private static final long serialVersionUID = 1L;

	private String username;

	public Administrator() {

	}

	public Administrator(ObjectId id) {
		super();
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		// result = prime * result + (int) (id ^ (id >>> 32));
		result = prime * result;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		Administrator other = (Administrator) obj;
		if (id != other.id)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Administrador id: " + this.getId() + " Nome Administrador: "
				+ super.toString();
	}
}